#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

const double zero=1e-8;

struct point{
	double x, y;
	point( double xx=0, double yy=0 ){
		x=xx; y=yy;
	}
	point operator +( const point &b )const{
		return point( x+b.x, y+b.y );
	}
	point operator -( const point &b )const{
		return point( x-b.x, y-b.y );
	}
	double operator *( const point &b )const{
		return x*b.x+y*b.y;
	}
	double operator /( const point &b )const{
		return x*b.y-y*b.x;
	}
	point operator /( const double t )const{
		return point( x/t, y/t );
	}
};

int n;
point p[100000];
point tmp[100000];

bool cmp( point a, point b ){
	return a.x<b.x;
}

bool cmp1( point a, point b ){
	return a.y<b.y;
}

double sqr( double x ){
	return x*x;
}

double dist( point a, point b ){
	return sqrt( sqr( a.x-b.x )+sqr( a.y-b.y ) );
}

double min( double a, double b ){
	if ( a<b ) return a; else return b;
}

double count( int l, int r ){
	int m=(l+r)/2;
	double ret=1e30;
	if (l>=r) return ret;
	int i;
	for ( i=m-1; i>=l && fabs( p[m].x-p[i].x )<zero; i-- );
	ret=count( l,i );
	for ( i=m+1; i<=r && fabs( p[m].x-p[i].x )<zero; i++ );
	ret=min( count( i, r ), ret );
	int t=0;
	for ( int i=m-1; i>=l && fabs( p[m].x-p[i].x )<ret+zero; i-- ) tmp[t++]=p[i];
	for ( int i=m; i<=r && fabs( p[m].x-p[i].x )<ret+zero; i++ ) tmp[t++]=p[i];
	sort( tmp, tmp+t, cmp1 );
	for ( int i=0; i<t; i++ )
		for ( int j=1; j<10; j++ )
			if ( i+j<t )
				ret=min( ret, dist( tmp[i], tmp[i+j] ) );
	return ret;
}

int main(){
	while (scanf("%d", &n)==1 && n){
		for ( int i=0; i<n; i++ )
			scanf("%lf %lf", &p[i].x, &p[i].y);
		sort( p, p+n, cmp );
		printf("%.2lf\n", count(0,n-1)/2);
	}
}
